package edu.guet.server.controller;

import edu.guet.server.model.Test;
import edu.guet.server.service.TestService;
import edu.guet.server.utils.ResultAPI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {
    @RequestMapping("/hello_world")
    public ResultAPI helloWorld() {
        return ResultAPI.success("hello world");
    }

    @Autowired
    TestService testService;
    @RequestMapping("/demoRequest")
    public ResultAPI demoRequest(@RequestBody Test data) {
        return testService.demoRequest(data);
    }


}
